package com.wsjc.web.controller.map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.wsjc.common.core.entity.ApiCommonResultVo;
import com.wsjc.manager.entity.vo.map.MapResultVo;
import com.wsjc.manager.service.rpc.map.WjMapService;

@RestController
@RequestMapping(value = "/boss/map/")
public class WjMapController {

	   
	private Logger logger = LoggerFactory.getLogger(WjMapController.class);
	
	@Autowired
	private WjMapService wjMapService ;
		
	

	/**
	 * 加载地图
	 * @param dataType
	 * @param scope
	 * @return
	 */
	@RequestMapping(value = "loadMap", method = RequestMethod.GET)
	public ApiCommonResultVo loadMap(String dataType, String scope) {
		
		try {
			MapResultVo mapResultVo = wjMapService.loadMap(scope, dataType);
			return new ApiCommonResultVo(0,"请求成功",mapResultVo == null? new MapResultVo() : mapResultVo) ;
		} catch (Exception e) {
			return new ApiCommonResultVo(-1,"系统异常",null) ;
		}
		
	}


	/**
	 * 加载地图
	 * @param dataType
	 * @param scope
	 * @return
	 */
	@RequestMapping(value = "test", method = RequestMethod.GET)
	public String test(String dataType, String scope) {
		
		return "test";
		
	}
	
	
	
	
	
	

}
